/**
 * 章节状态
 */
export type ChapterStatus = 'draft' | 'completed' | 'review' | 'archived';

/**
 * Quill编辑器内容类型
 * Quill使用Delta对象存储内容
 */
export interface QuillContent {
  ops: Array<{
    insert: string | object;
    attributes?: object;
    retain?: number;
    delete?: number;
  }>;
}

/**
 * 章节模型
 */
export interface Chapter {
  id: string;
  title: string;
  subtitle?: string;
  content: string | QuillContent;
  wordCount: number;
  createdAt: string;
  updatedAt: string;
  status: ChapterStatus;
  order: number;
  projectId: string;
  isLocked?: boolean;
}

/**
 * 创建章节参数
 */
export interface CreateChapterParams {
  projectId: string;
  title: string;
  content?: QuillContent;
  status?: ChapterStatus;
  order?: number;
}

/**
 * 更新章节参数
 */
export interface UpdateChapterParams {
  title?: string;
  content?: QuillContent;
  status?: ChapterStatus;
  order?: number;
  isLocked?: boolean;
} 